package ch.trainingtest.dao;

import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.TypedQuery;
import ch.trainingtest.base.dao.BaseDao;
import ch.trainingtest.common.NamedQueryConstants;
import ch.trainingtest.entity.Task;

@Stateless
public class TaskDao extends BaseDao<Task>{
	public List<Task> getAllTasks() {
		TypedQuery<Task> query = getEm().createNamedQuery(NamedQueryConstants.TASK_GET_ALL_TASKS, Task.class);
		List<Task> result = query.getResultList();
		return result;
	}
	
}
